﻿using System.Collections.Generic;
using System.Data;
using System.Linq;
using ApiManage.Models.MongoMappings.Sys;
using Autofac.Extras.DynamicProxy;
using Rhonin.Common.Cache;
using Rhonin.Common.Components;
using Rhonin.Common.Entity.Page;

namespace ApiManage.Service.MySql.Sys.Impl
{
    [Component(LifeStyle.Singleton)]
    [Intercept(typeof(CacheInterceptor))]
    public class SysUserQueryService :BaseQueryService, ISysUserQueryService
    {
        public List<SysUser> GetList(QueryPage where)
        {
            var sql = @"SELECT *
            FROM SysUser LIMIT @SKIP,@Limit";
            return QueryList<SysUser>(sql, new
            {
                where.Skip,
                where.Limit
            }).ToList();
        }
    }
}
